public class Test {
    public static void main(String[] args) {
        Object lock=new Object();
        Thread t=new Thread(()->{
            for (int i=0;i<10;i++){
                synchronized (lock){
                    System.out.println(i);
                }
            }
        });
        Thread t1=new Thread(()->{
            synchronized (lock){
                for (int i=0;i<10;i++){
                    System.out.println(i);
                }
            }
        });
        t.start();
        t1.start();
    }
    public static void main1(String[] args) {
        Solution s=new Solution();
        int [] arr=new int[]{10,2};
        System.out.println(s.minNumber(arr));
        System.out.println("aaa");
    }
}
